<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>20_position定位.html</title>
  </head>
  <link rel="stylesheet" href="./day01/css/basic.css" />
  <style>
    .container {
      width: 200px;
      height: 200px;
      background-color: pink;
      position: relative;
      margin: 10px 10px;
    }
    .item,
    .item_2,
    .item_3,
    .item_4,
    .item_5,
    .item_6,
    .item_7,
    .item_8,
    .item_9 {
      width: 50px;
      height: 50px;
      background-color: blue;
      position: absolute;
    }
    .item_2 {
      background-color: brown;
      right: 0;
    }
    .item_3 {
      background-color: black;
      bottom: 0;
    }
    .item_4 {
      background-color: blue;
      right: 0;
      bottom: 0;
    }
    .item_5 {
      background-color: burlywood;
      right: 0;
      left: 50%;
      top: 50%;
      transform: translate(-25px, -25px);
    }
    .item_6 {
      background-color: burlywood;
      left: 50%;
      transform: translate(-25px, 0);
    }
    .item_7 {
      background-color: burlywood;
      top: 50%;
      transform: translate(0, -25px);
    }
    .item_8 {
      background-color: burlywood;
      right: 0;
      bottom: 50%;
      transform: translate(0, 25px);
    }
    .item_9 {
      background-color: burlywood;
      bottom: 0;
      right: 50%;
      transform: translate(25px, 0);
    }
  </style>
  <body>
    <div class="container">
      <div class="item"></div>
      <div class="item_2"></div>
      <div class="item_3"></div>
      <div class="item_4"></div>
      <div class="item_5"></div>
      <div class="item_6"></div>
      <div class="item_7"></div>
      <div class="item_8"></div>
      <div class="item_9"></div>
    </div>
  </body>
</html>
